﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="NamedItemViewBinding.cs" company="">
//   
// </copyright>
// <summary>
//   The named item view binding.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace Libium.Bindings
{
    using Libium.UseCases;
    using Libium.Views;

    /// <summary>
    ///   The named item view binding.
    /// </summary>
    public class NamedItemViewBinding : UseCaseBinding<INamedItemUseCase, INamedItemView>
    {
        #region Constructors and Destructors

        /// <summary>
        /// Initializes a new instance of the <see cref="NamedItemViewBinding"/> class.
        /// </summary>
        /// <param name="service">
        /// The service. 
        /// </param>
        /// <param name="useCase">
        /// The use case. 
        /// </param>
        /// <param name="view">
        /// The view. 
        /// </param>
        public NamedItemViewBinding(IBindService service, INamedItemUseCase useCase, INamedItemView view)
            : base(service, useCase, view)
        {
        }

        #endregion

        #region Public Methods and Operators

        /// <summary>
        ///   The bind.
        /// </summary>
        public override void Bind()
        {
            base.Bind();
            View.Name = UseCase.Name;
            Bind(UseCase.ItemUseCase, View.ItemView);
        }

        #endregion
    }
}